const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const BlogType = {
  title: String,
  content: String,
  category: Number,  // 1 - 技术文章 2 - 热点新闻 3 - 日常杂谈
  cover: String,
  isPublish: Number,  // 0 - 未发布 1 - 已发布
  updateTime: Date
}

const BlogModel = mongoose.model('blog', new Schema(BlogType, { versionKey: false }));
module.exports = BlogModel;